/* 状态栏样式覆盖 */
.red-view-content {
    height: 100%;
    padding: 10px 10px 0 10px;
    overflow: auto;
    background: var(--background-primary);
}

/* ===== 工具栏 ===== */
.red-toolbar, .red-bottom-bar {
    padding: 15px 0;
    max-width: 580px;
}

.red-toolbar {
    top: 0;
    border-radius: 8px;
    border-bottom: 2px solid var(--background-modifier-border);
}

.red-bottom-bar {
    bottom: 0;
    border-radius: 8px;
    border-top: 2px solid var(--background-modifier-border);
}

/* 控件组布局 */
.red-controls-group {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    justify-content: flex-start;  /* 改为靠左对齐 */
    flex-wrap: nowrap;
    min-width: 0;
}

/* ===== 按钮基础样式 ===== */
.red-controls-group button {
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--background-modifier-border);
    background: var(--background-primary);
    color: var(--text-normal);
    font-size: 14px;
    box-shadow: 0 1px 3px var(--background-modifier-box-shadow);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
}

/* 按钮文本样式 */
.red-controls-group button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.red-controls-group button:hover {
    background: var(--background-modifier-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--background-modifier-box-shadow);
}

.red-controls-group button:disabled {
    opacity: 0.5;
    background: var(--background-primary) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed !important;
    transform: none;
    border-color: var(--background-modifier-border) !important;
    box-shadow: none;
}

/* 特殊按钮样式 */
.red-controls-group .red-lock-button,
.red-controls-group .red-help-button {
    width: 36px;
    padding: 0;
    margin: 0 20px 0 10px;
    flex: none ;
}
.red-controls-group .red-like-button {
    flex: none;
}

.red-controls-group .red-export-button {
    background-color: var(--text-accent);
    color: var(--text-on-accent);
}
.red-controls-group .red-export-button:hover {
    color: var(--text-on-accent);
    background-color: var(--text-accent);
}

.red-controls-group .red-background-button {
    width: 36px;
    padding: 0;
    flex: none ;
}

/* ===== 下拉选择器 ===== */
.red-select-container {
    position: relative;
    max-width: 200px;
    flex: 1;
}

.red-select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--background-modifier-border);
    border-radius: 8px;
    background: var(--background-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    color: var(--text-normal);
    box-shadow: 0 1px 3px var(--background-modifier-box-shadow);
    white-space: nowrap;
    overflow: hidden;
}
.red-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.red-select:hover {
    background: var(--background-modifier-hover);
    box-shadow: 0 2px 6px var(--background-modifier-box-shadow);
}

.red-select.disabled {
    opacity: 0.5;
    background: var(--background-secondary) !important;
    color: var(--text-muted) !important;
    border-color: var(--background-modifier-border) !important;
    cursor: not-allowed;
    box-shadow: none;
}

.red-select-arrow {
    color: var(--text-normal);
    font-size: 12px;
    transition: transform 0.2s ease;
    margin-left: 4px;
    flex-shrink: 0;
}

.red-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: var(--background-primary);
    border: 1px solid var(--background-modifier-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--background-modifier-box-shadow);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.red-select-dropdown.red-show {
    display: block;
}

.red-select-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-normal);
}

.red-select-item:hover {
    background: var(--background-modifier-hover);
}

.red-select-item.red-selected {
    background: var(--background-modifier-hover);
    color: var(--text-accent);
}

/* ===== 字号调整组件 ===== */
.red-font-size-group {
    height: 36px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;

    background: var(--background-primary);
    border: 1px solid var(--background-modifier-border);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 1px 3px var(--background-modifier-box-shadow);
}

.red-font-size-input {
    width: 30px;
    text-align: center;
}

/* ===== 帮助提示 ===== */
.red-help-tooltip {
    position: absolute;
    left: 30px;
    bottom: 80px;
    width: 480px;
    padding: 12px 16px;
    background: var(--background-primary);
    border: 2px solid var(--background-modifier-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--background-modifier-box-shadow);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-normal);
    display: none;
    white-space: pre-line;
    z-index: 1000;
}

.red-help-button:hover + .red-help-tooltip {
    display: block;
}

/* 复制按钮样式 */
.red-copy-button {
    position: absolute;
    top: 24px;
    right: 30px;
    z-index: 100;
    background-color: var(--background-primary);
    color: var(--text-normal);
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.red-preview-container:hover .red-copy-button {
    opacity: 1;
}

.red-copy-button:hover {
    background-color: var(--background-primary-alt);
}

.red-copy-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}